<div>
    <ol class="breadcrumb" >
        <li> <i class="fa fa-anchor"></i>统计管理</li>
        <li>全市统计</li>
        <li style="float: right"><a  href="javascript:history.go(-1);">返回</a></li>
    </ol>

    <div class="panel">
        <div class="indexTitle"><i class="fa fa-list">&nbsp;&nbsp;</i>电站运营总览 　　　　总计&nbsp;&nbsp;<i class="fa fa-map-marker">&nbsp;{$city}</i></div>
        <div class="panel-body search-panel-body">
            <div class="col-xs-5" style=" width:200px;">
                <div class="input-group">
                    <span class="input-group-addon" style="width:80px;">所在区县</span>
                    <select id="location" name="location" class="form-control" style="width:200px;">
                        <option value="0">--</option>
                        <volist name="china" id="vo">
                            <option value="{$vo.code}" class="{$vo.pcode}">{$vo.name}</option>
                        </volist>
                    </select>
                </div>
            </div>
        </div>
    </div>
    <table  class="table table-bordered table-striped table-mcit" >
    <thead>
    <tr>
        <th >
            <empty name="is_order_name">
                <button class='btn btn-block btn-mcit' type='submit' name='order_name' value=''>站点ID</button>
                <else/>
                <button class='btn btn-block btn-mcit btn-mcit-active'  type='submit' name='order_name' value=''>
                    <if condition="$order_name eq 1">
                        <i class="fa fa-chevron-down"></i>
                        <else/>
                        <i class="fa fa-chevron-up"></i>
                    </if>
                    &nbsp;站点ID
                </button>
            </empty>
        </th>
        <th>
            <empty name="is_order_stu_num">
                <button class='btn btn-block btn-mcit' type='submit' name='order_stu_num' value=>名称</button>
                <else/>
                <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_stu_num' value=''>
                    <if condition="$order_stu_num eq 1">
                        <i class="fa fa-chevron-down"></i>
                        <else/>
                        <i class="fa fa-chevron-up"></i>
                    </if>
                    &nbsp;名称
                </button>
            </empty>
        </th>
        <th>
            <empty name="is_order_idcard">
                <button class='btn btn-block btn-mcit' type='submit' name='order_idcard' value=>所在区域</button>
                <else/>
                <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_idcard' value=''>
                    <if condition="$order_idcard eq 1">
                        <i class="fa fa-chevron-down"></i>
                        <else/>
                        <i class="fa fa-chevron-up"></i>
                    </if>
                    &nbsp;所在地
                </button>
            </empty>
        </th>
        <th>
            <empty name="is_order_major">
                <button class='btn btn-block btn-mcit' type='submit' name='order_major' value=>类型</button>
                <else/>
                <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_major' value=''>
                    <if condition="$order_major eq 1">
                        <i class="fa fa-chevron-down"></i>
                        <else/>
                        <i class="fa fa-chevron-up"></i>
                    </if>
                    &nbsp;类型
                </button>
            </empty>
        </th>
        <th>
            <empty name="is_order_tel">
                <button class='btn btn-block btn-mcit' type='submit' name='order_tel' value=''>预约</button>
                <else/>
                <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_tel' value=>
                    <if condition="$order_tel eq 1">
                        <i class="fa fa-chevron-down"></i>
                        <else/>
                        <i class="fa fa-chevron-up"></i>
                    </if>
                    &nbsp;预约
                </button>
            </empty>
        </th>
        <th>
            <empty name="is_order_tel">
                <button class='btn btn-block btn-mcit' type='submit' name='order_tel' value=''>当前状态</button>
                <else/>
                <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_tel' value=>
                    <if condition="$order_tel eq 1">
                        <i class="fa fa-chevron-down"></i>
                        <else/>
                        <i class="fa fa-chevron-up"></i>
                    </if>
                    &nbsp;当前状态
                </button>
            </empty>
        </th>
        <th>
            <empty name="is_order_tel">
                <button class='btn btn-block btn-mcit' type='submit' name='order_tel' value=''>是否实时</button>
                <else/>
                <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_tel' value=>
                    <if condition="$order_tel eq 1">
                        <i class="fa fa-chevron-down"></i>
                        <else/>
                        <i class="fa fa-chevron-up"></i>
                    </if>
                    &nbsp;是否实时
                </button>
            </empty>
        </th>
        <th>
            <empty name="is_order_qq">
                <button class='btn btn-block btn-mcit' type='submit' name='order_qq' value=''>电桩数量</button>
                <else/>
                <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_qq' value=''>
                    <if condition="$order_qq eq 1">
                        <i class="fa fa-chevron-down"></i>
                        <else/>
                        <i class="fa fa-chevron-up"></i>
                    </if>
                    &nbsp;电桩数量
                </button>
            </empty>
        </th>
        <th>
            <empty name="is_order_household">
                <button class='btn btn-block btn-mcit' type='submit' name='order_household' value=''>可充数量</button>
                <else/>
                <button class='btn btn-block btn-mcit btn-mcit-active' type='submit' name='order_household' value=''>
                    <if condition="$order_household eq 1">
                        <i class="fa fa-chevron-down"></i>
                        <else/>
                        <i class="fa fa-chevron-up"></i>
                    </if>
                    &nbsp;可充数量
                </button>
            </empty>
        </th>
    </tr>
    </thead>
    <tbody id="DataTableContent">
    <empty name="plant">
        <td colspan="99" style="text-align:center" class="danger"> <strong><i class="fa fa-meh-o"></i>
            &nbsp;&nbsp;当前条件下没有数据</strong>
        </td>
        <else />
        <volist name="plant" id="data">
            <tr>
                <td>{$data.id}</td>
                <td><span title="{$data.name}">{$data.name_text}</span></td>
                <td>{$data.location}</td>
                <td><if condition="$data.evc_type eq 1">直流<else />交流</if></td>
                <td><if condition="$data.booking eq 1">支持<else />不支持</if></td>
                <td>
                    <if condition="$data.current_state eq 3">
                        <a class="btn btn-warning btn-xs changehh" data-value="2" data-id="{$data.id}" data-info="确定将该站点状态修改为“安装中”？?">
                            &nbsp;&nbsp;&nbsp;规划中&nbsp;&nbsp;&nbsp;
                        </a>
                        <elseif condition="$data.current_state eq 2"/>
                        <a class="btn btn-warning btn-xs changehh" data-value="1" data-id="{$data.id}" data-info="确定将该站点状态修改为“运营中”？">
                            &nbsp;&nbsp;&nbsp;安装中&nbsp;&nbsp;&nbsp;
                        </a>
                        <else />
                        <a class="btn btn-success btn-xs" data-value="3" data-id="{$data.id}" data-info="确定将该站点状态修改为“规划中”？">
                            &nbsp;&nbsp;&nbsp;运营中&nbsp;&nbsp;&nbsp;
                        </a>
                    </if>
                </td>
                <td>
                    <if condition="$data.is_active eq 1">
                        <a class="btn  btn-xs changeA"  data-value="0" data-id="{$data.id}" data-info="确定修改为“不支持实时”？">
                            <img src="__PUBLIC__/img/gou.png" alt="是"/>
                        </a>
                        <else />
                        <a class="btn  btn-xs changeA" data-value="1" data-id="{$data.id}" data-info="确定修改为“支持实时”？">
                            <img src="__PUBLIC__/img/cha.png" alt="否"/>
                        </a>
                    </if>
                </td>
                <td>{$data.total_ev}</td>
                <td>{$data.total_par}</td>
            </tr>
        </volist>
    </empty>
    <tr>
        <td colspan="99" style="text-align:center">
            <ul class="pagination">{$pageView}</ul>
        </td>
    </tr>
    </tbody>
    </table>
</div>
<script>
    $(document).ready(function () {

        $("#location").change(function(){
            var code = $(this).val();
            var district = $(this).children('option:selected').attr("class");
            //alert(district);
            $.ajax({
                type:"post",
                url:'__URL__/district',
                data: {code:code,district:district},
                dataType: "json",
                success:function(data){
                    //alert(data);
                    $("#DataTableContent").html(data.html);
                }
            });
        });
    })
</script>